<?php

require_once 'init.php';

$page = Page::get('main');
$smarty->assign('page',$page);

$smarty->assign('images', 
	array(
		'images/01.jpg','images/02.jpg','images/03.jpg','images/04.jpg','images/05.jpg','images/06.jpg',
		'images/07.jpg','images/08.jpg','images/09.jpg','images/10.jpg','images/11.jpg','images/12.jpg'
	)
);

$smarty->assign('events', query2arrays("SELECT IFNULL(code_url,id) as id, name, DATE_FORMAT(dt,'%d.%m.%Y') as dt, image, short_descr FROM events ORDER BY events.dt DESC LIMIT 2"));

$smarty->display('index.tpl');

?>